﻿using System;
using System.Windows.Forms;

namespace SedionFormDesigner.CusControls.DataGridView
{
    public class ExternPropTextBoxColumn : DataGridViewColumn
    {
        private Boolean fillable;
        public Boolean Fillable
        {
            get { return fillable; }
            set { fillable = value; }
        }

        private String gather;
        public String Gather
        {
            get { return gather; }
            set { gather = value; }
        }

        public ExternPropTextBoxColumn()
            : base(new ExternPropTextBoxCell())
        { }

        public override DataGridViewCell CellTemplate
        {
            get
            {
                return base.CellTemplate;
            }
            set
            {
                if (value != null && !value.GetType().IsAssignableFrom(typeof(ExternPropTextBoxCell)))
                    throw new InvalidCastException("必须是一个扩展文本单元格");
                base.CellTemplate = value;
            }
        }
    }
}
